<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="<?=domain?>static/style/manage.css" rel="stylesheet" type="text/css" />
<link href="<?=domain?>static/style/fancybox.css" rel="stylesheet" type="text/css" />
<link href="<?=domain?>static/style/datepicker.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=domain?>static/scripts/core.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/fancybox.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/datepicker.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/manage.js" charset="utf-8"></script>
<title><?=name?></title>
<body class="hoariness">
<div class="head">
	<div class="area">
		<div class="logo">网站联盟管理后台</div>
		<div class="parent">
			<div class="nav">
				<ul>
					<?php
						foreach($menu as $key=>$value){
							echo '<li><a href="'.domain.'index.php?c='.$value['child'][0]['controller'].'&a='.$value['child'][0]['method'].'" class="'.(stristr($value['controller'],$this->request['controller'])?'sel':'').'">'.$value['name'].'</a></li>';
						}
					?>
	    		</ul>
			</div>
			<div class="user">欢迎您&nbsp;<?=$name?>&nbsp;,<a href="<?=domain?>index.php?c=manage&a=out">【退出】</a></div>
		</div>
	</div>
	<div class="child">
		<div class="nav">
			<?php
				$controller=0;$method=0;
				foreach($menu as $k=>$v){
					if(stristr($v['controller'],$this->request['controller'])){
						$controller=$k;
						echo '<ul class="sel '.$v['controller'].'">';
					}else{
						echo '<ul class="'.$v['controller'].'">';
					}
					foreach($v['child'] as $key=>$value){
						if($value['method']==$this->request['method']&&$value['controller']==$this->request['controller']){
							$method=$key;
						}
						echo '<li class="'.$value['method'].'"><a href="'.domain.'index.php?c='.$value['controller'].'&a='.$value['method'].'">'.$value['name'].'</a></li>';
					}
					echo '</ul>';
				}
			?>
		</div>
		<div class="place">当前位置:<?=$menu[$controller]['name']?>&nbsp;>&nbsp;<?=$menu[$controller]['child'][$method]['name']?></div>
	</div>
</div>
<div class="work">
	<div class="form">
		<h3 class="real">
           <div class="m"><?=$menu[$controller]['child'][$method]['name']?></div>
           <?php if(isset($purview['content']['append'])){?><a fancybox="width:940,height:620" href="<?=(domain.'index.php?c=content&a=append')?>" class="hd add">添加内容</a><?php }?>
           <div class="search">
	           <form name="home" method="GET" action="<?=domain?>index.php" accept-charset="UTF-8">
	  		   <input type="hidden" name="c" value="content"/><input type="hidden" name="a" value="index"/>
	           <div class="input"><input type="text" name="search" value="<?=$search?>" size="13" maxlength="60" search="true"<?=(empty($search)?'':' class="wipe"')?>/></div>
	           <div class="tab select">
	           		<a href="#"><label>标题</label><input type="hidden" name="tab" value="title"/><span></span></a>
	           		<ul>
				   	  <li tab="mail"<?=($tab=='mail'?' selected':'')?>><a href="#">成员</a></li>
					  <li tab="title"<?=($tab=='title'?' selected':'')?>><a href="#">标题</a></li>
			   		</ul>
	           </div>
	           <div class="submit"><input type="submit" name="filter" value="搜索" class="yellow"/></div>
	           </form>
           </div>
        </h3>
		 <table class="fix">
			<thead>
				<tr>
					<th><input type="checkbox" name="all" value="" id="input_all"/></th>
					<th>添加人</th>
					<th>分类</th>
					<th>标题</th>
					<th><a href="<?=$basic?>&order=date&rule=<?=($rule=='desc'&&$order=='date'?'asc':'desc')?>">添加时间</a><?php if($order=='date'){?><span class="<?=$rule?>"></span><?php }?></th>
					<th><a href="<?=$basic?>&order=sequence&rule=<?=($rule=='desc'&&$order=='sequence'?'asc':'desc')?>">排序<?php if($order=='sequence'){?><span class="<?=$rule?>"></span><?php }?></th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<?php
					foreach($content as $key=>$value){
				?>
				<tr>
					<td><input type="checkbox" name="name" value=""/></td>
					<td><?=$value['mail']?></td>
					<td><?=$sort[$value['sort']]['name']?></td>
					<td><?=$value['title']?></td>
					<td><?=date('Y-m-d H:i:s',$value['date'])?></td>
					<td><?=$value['sequence']?></td>
					<td><?=$value['locked']==0?'正常':($value['locked']==1?'待审核':'失效')?></td>
					<td>
						<?php if(isset($purview['content']['edit'])){?><a fancybox="width:940,height:620" href="<?=(domain.'index.php?c=content&a=edit&id='.$value['id'])?>">编辑</a>&nbsp;<?php }?>
						<?php if(isset($purview['content']['locked'])){?><a href="<?=(domain.'index.php?c=content&a=locked&id='.$value['id'])?>" action="RequestA" mixed="sub:{locked:<?=($value['locked']==0?10:0)?>}"><?=($value['locked']==0?'失效':'通过')?></a>&nbsp;<?php }?>
						<?php if(isset($purview['content']['wipe'])){?><a href="<?=(domain.'index.php?c=content&a=wipe&id='.$value['id'])?>" action="RequestA" mixed="confirm:true">删除</a><?php }?>
					</td>
				</tr>
				<?php
					}
				?>
			</tbody>
		</table>
		<div class="batch">
			<span><label for="input_all">全选</label></span>
			<?php if(isset($purview['content']['locked'])){?><span><a href="<?=(domain.'index.php?c=publish&a=locked&locked=0')?>" action="RequestBa" mixed="'funcSi'">批量激活</a></span><?php }?>
			<?php if(isset($purview['content']['locked'])){?><span><a href="<?=(domain.'index.php?c=publish&a=locked&locked=10')?>" action="RequestBa" mixed="'funcSi'">失效</a></span><?php }?>
			<?php if(isset($purview['content']['wipe'])){?><span><a href="<?=(domain.'index.php?c=publish&a=wipe')?>" action="RequestBa" mixed="'funcSi'">删除</a></span><?php }?>
		</div>
	</div>
	<div class="pagination"><?=$pagination?>&nbsp;&nbsp;<font>共<?=$total?>条记录</font></div>
</div>
<div class="footer">
	<div class="credits">Power by <a href="http://www.cnadlm.com" target="_blank">cnadlm.com</a></div>
	<div class="connect">
		<a href="http://www.cnadlm.com" target="_blank">系统升级</a>
		<a href="http://www.cnadlm.com/help.html" target="_blank">帮助文档</a>
	</div>
</div>
</body>
</html>
<script language="JavaScript" type="text/javascript">
 $('input[name="date"]').DatePicker({
	date:['2008-07-28','2008-07-31'],
	position:'bottom',
	calendars:2,
	mode:'range',
	onBeforeShow:function(){
		$('input[name="date"]').parents('.select').attr('lock','true');
	},
	onChange:function(formated){
		formated=formated.toString();
		if(formated.indexOf('1970-01-01')==-1){
			$('input[name="date"]').val(formated);
			$('input[name="date"]').DatePickerHide();
		}
	},
	onHide:function(){
		$('input[name="date"]').parents('.select').removeAttr('lock');
	}
});
</script>